#include<linux/module.h>
#include<linux/sched.h>
#include<linux/pid.h>
MODULE_LICENSE("GPL");
static int __init put_pid_init(void)
{
	printk("into put_pid_init.\n");
	struct pid *kpid=find_get_pid(current->pid);
	printk("the count of the pid is :%d\n",kpid->count);
	printk("the level of the pid is :%d\n",kpid->level);

	printk("the pid of the find_get_pid is:%d\n",kpid->numbers[kpid->level].nr);
	put_pid(kpid);
	printk("the new value after the function put_pid:\n");
	printk("the new count of the pid is:%d\n",kpid->count);
	printk("the new level of the pid is:%d\n",kpid->level);

	printk("the new pid of the thread is:%d\n",kpid->numbers[kpid->level].nr);
	printk("the pid of current thread is:%d\n",current->pid);
	printk("out put_pid_init.\n");
	return 0;
}
static void __exit put_pid_exit(void)
{
	printk("Goodbye put_pid\n");
}
module_init(put_pid_init);
module_exit(put_pid_exit);
